<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:82:"D:\www\jiedanwwangshangjiatwo\public/../application/admin\view\merchant\index.html";i:1583225633;s:71:"D:\www\jiedanwwangshangjiatwo\application\admin\view\public\header.html";i:1545961364;s:69:"D:\www\jiedanwwangshangjiatwo\application\admin\view\public\left.html";i:1582874731;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>网站管理系统</title>
<meta name="author" content="" />
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/style.css" />
	<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/page.css" />

<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<![endif]-->
	<link href="__STATIC__/admin/font/css/font-awesome.min.css" rel="stylesheet" />
	<link href="__STATIC__/admin/css/main.css" rel="stylesheet" type="text/css">
<script src="__STATIC__/admin/js/jquery.js"></script>
<script src="__STATIC__/admin/js/jquery.mCustomScrollbar.concat.min.js"></script>

<script type="text/javascript" charset="utf-8" src="__STATIC__/admin/js/editor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__STATIC__/admin/js/editor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="__STATIC__/admin/js/editor/lang/zh-cn/zh-cn.js"></script>
	<script src="__STATIC__/admin/js/layer/layer.js"></script>
<script>
	(function($){
		$(window).load(function(){
			
			$("a[rel='load-content']").click(function(e){
				e.preventDefault();
				var url=$(this).attr("href");
				$.get(url,function(data){
					$(".content .mCSB_container").append(data); //load new content inside .mCSB_container
					//scroll-to appended content 
					$(".content").mCustomScrollbar("scrollTo","h2:last");
				});
			});
			
			$(".content").delegate("a[href='top']","click",function(e){
				e.preventDefault();
				$(".content").mCustomScrollbar("scrollTo",$(this).attr("href"));
			});
			
		});
	})(jQuery);
</script>
</head>
<body>
<header>
 <h1><img src="__STATIC__/admin/images/admin_logo.png"/></h1>
 <ul class="rt_nav">
  <li><a href="<?php echo url('index/index/index'); ?>" target="_blank" class="website_icon">站点首页</a></li>
  <li><a class="admin_icon"><?php echo $info['account']; ?></a></li>
  <li><a href="#" class="set_icon">账号设置</a></li>
  <li><a href="<?php echo url('Login/login_out'); ?>" class="quit_icon">安全退出</a></li>
 </ul>
</header>
<style>
	.my_ul{
		height: 45px;background-color: #F0F0EE;margin-left: 210px;line-height: 46px;border-bottom: 1px solid #b6b6b6;
	}
	.my_ul li a{
		float: left;color: #333;margin-left: 20px;font-size: 14px;
	}
	.my_ul li a:hover{
		color: #19A97B;
	}
</style>
<section>
	<ul class="my_ul">
		
	</ul>
</section>
<?php
 $active=request()->controller().'/'.request()->action();

?>
<aside class="lt_aside_nav content mCustomScrollbar">
	<h2><a href="<?php echo url('Index/index'); ?>">起始页</a></h2>
	<ul>
		<?php if($group_power == 'all' || in_array('client',$group_power)): ?>
		<li>
			<dl>
				<dt>客户列表</dt>
				<?php if($role_right == 'all' || in_array('Center@member',$role_right)): ?>
				<dd>
					<a href="<?php echo url('Center/member'); ?>"  <?php if($active == 'Center/member'): ?>class="active"<?php endif; ?>>会员列表</a>
				</dd>
				<?php endif; if($role_right == 'all' || in_array('Merchant@index',$role_right)): ?>
					<dd>
						<a href="<?php echo url('Merchant/index'); ?>"  <?php if($active == 'Merchant/index'): ?>class="active"<?php endif; ?>>商户列表</a>
					</dd>
				<?php endif; if($role_right == 'all' || in_array('Driver@index',$role_right)): ?>
					<dd>
						<a href="<?php echo url('Driver/index'); ?>"  <?php if($active == 'Driver/index'): ?>class="active"<?php endif; ?>>司机列表</a>
					</dd>
				<?php endif; if($role_right == 'all' || in_array('Merchant@variety',$role_right)): ?>
					<dd>
						<a href="<?php echo url('Merchant/variety'); ?>"  <?php if($active == 'Merchant/variety'): ?>class="active"<?php endif; ?>>菜品统计</a>
					</dd>
				<?php endif; ?>
			</dl>
		</li>
			<?php endif; if($group_power == 'all' || in_array('data',$group_power)): ?>
			<li>
				<dl>
					<dt>数据</dt>
					<?php if($role_right == 'all' || in_array('Order@order_list',$role_right)): ?>
						<dd>
							<a href="<?php echo url('Order/order_list'); ?>"  <?php if($active == 'Order/order_list'): ?>class="active"<?php endif; ?>>订单列表</a>
						</dd>
					<?php endif; if($role_right == 'all' || in_array('Withdrawals@index',$role_right)): ?>
						<dd>
							<a href="<?php echo url('Withdrawals/index'); ?>"  <?php if($active == 'Withdrawals/index'): ?>class="active"<?php endif; ?>>提现列表</a>
						</dd>
					<?php endif; ?>
					<dd>
						<a href="<?php echo url('Membership/list_driver_withdrawals'); ?>">司机提现列表</a>
					</dd>
					<dd>
						<a href="<?php echo url('Membership/list_driver_balance'); ?>">司机收入列表</a>
					</dd>
				</dl>
			</li>
		<?php endif; if($group_power == 'all' || in_array('distribution',$group_power)): ?>
			<li>
				<dl>
					<dt>分销推广</dt>
					<dd>
						<a href="<?php echo url('Membership/list_index'); ?>">会员审核列表</a>
					</dd>
					<dd>
						<a href="<?php echo url('Membership/list_withdrawals'); ?>">分销提现列表</a>
					</dd>

					<dd>
						<a href="<?php echo url('Membership/list_system_balance'); ?>">平台回扣列表</a>
					</dd>
					<dd>
						<a href="<?php echo url('Membership/list_member_balance'); ?>">会员佣金列表</a>
					</dd>
					<dd>
						<a href="<?php echo url('Membership/list_mention_balance'); ?>">自提佣金列表</a>
					</dd>
				</dl>
			</li>
		<?php endif; if($group_power == 'all' || in_array('set',$group_power)): ?>
			<li>
				<dl>
					<dt>店铺设置</dt>
					<?php if($role_right == 'all' || in_array('Set@banner',$role_right)): ?>
						<!-- <dd>
							<a href="<?php echo url('Set/banner'); ?>"  <?php if($active == 'Set/banner'): ?>class="active"<?php endif; ?>>店铺轮播图</a>
						</dd> -->
					<?php endif; if($role_right == 'all' || in_array('Set@banner',$role_right)): ?>
						<dd>
							<a href="<?php echo url('Set/shop_list'); ?>"  <?php if($active == 'Set/banner'): ?>class="active"<?php endif; ?>>店铺列表</a>
						</dd>
					<?php endif; if($role_right == 'all' || in_array('Set@activity',$role_right)): ?>
						<!-- <dd>
							<a href="<?php echo url('Set/activity'); ?>"  <?php if($active == 'Set/activity'): ?>class="active"<?php endif; ?>>首页活动专区</a>
						</dd> -->
					<?php endif; if($role_right == 'all' || in_array('Set@banner2',$role_right)): ?>
						<!-- <dd>
							<a href="<?php echo url('Set/banner2'); ?>"  <?php if($active == 'Set/banner2'): ?>class="active"<?php endif; ?>>轮播图2</a>
						</dd> -->
					<?php endif; if($role_right == 'all' || in_array('Set@category',$role_right)): ?>
						<!-- <dd>
							<a href="<?php echo url('Set/category'); ?>"  <?php if($active == 'Set/category'): ?>class="active"<?php endif; ?>>店铺分类</a>
						</dd> -->
					<?php endif; ?>
				</dl>
			</li>
		<?php endif; if($group_power == 'all' || in_array('set',$group_power)): ?>
			<li>
				<dl>
					<dt>设置</dt>
					<?php if($role_right == 'all' || in_array('Set@about',$role_right)): ?>
						<dd>
							<a href="<?php echo url('Set/about'); ?>"  <?php if($active == 'Set/about'): ?>class="active"<?php endif; ?>>关于我们</a>
						</dd>
					<?php endif; if($role_right == 'all' || in_array('Set@activity2',$role_right)): ?>
						<!-- <dd>
							<a href="<?php echo url('Set/activity2'); ?>"  <?php if($active == 'Set/activity2'): ?>class="active"<?php endif; ?>>线路活动专区</a>
						</dd> -->
					<?php endif; if($role_right == 'all' || in_array('Set@feedback',$role_right)): ?>
						<dd>
							<a href="<?php echo url('Set/feedback'); ?>"  <?php if($active == 'Set/feedback'): ?>class="active"<?php endif; ?>>意见反馈</a>
						</dd>
					<?php endif; if($role_right == 'all' || in_array('Set@index',$role_right)): ?>
						<dd>
							<a href="<?php echo url('Set/index'); ?>"  <?php if($active == 'Set/index'): ?>class="active"<?php endif; ?>>系统设置</a>
						</dd>
					<?php endif; ?>
				</dl>
			</li>
		<?php endif; if($group_power == 'all'): ?>
			<li>
				<dl>
					<dt>权限管理</dt>
					<dd>
						<a href="<?php echo url('Admin/li'); ?>"  <?php if($active == 'Admin/li'): ?>class="active"<?php endif; ?>>管理员</a>
					</dd>
					<dd>
						<a href="<?php echo url('Admin/role'); ?>"  <?php if($active == 'Admin/role'): ?>class="active"<?php endif; ?>>角色管理</a>
					</dd>
					<!-- <dd>
						<a href="<?php echo url('Admin/right_list'); ?>"  <?php if($active == 'Admin/right_list'): ?>class="active"<?php endif; ?>>权限列表</a>
					</dd> -->
				</dl>
			</li>
		<?php endif; ?>
		<li>
			<p class="btm_infor">© 版权所有</p>
		</li>
	</ul>

</aside>
<section class="rt_wrap content mCustomScrollbar">
	<div class="rt_content">

		<!--点击加载-->
		<script>
			$(document).ready(function() {
				$("#loading").click(function() {
					$(".loading_area").fadeIn();
					$(".loading_area").fadeOut(1500);
				});
			});
		</script>
		<section class="loading_area">
			<div class="loading_cont">
				<div class="loading_icon"><i></i><i></i><i></i><i></i><i></i></div>
				<div class="loading_txt"><mark>数据正在加载，请稍后！</mark></div>
			</div>
		</section>
		<!--结束加载-->
		<!--弹出框效果-->
		<script>
			$(document).ready(function() {
				//弹出文本性提示框
				$("#showPopTxt").click(function() {
					$(".pop_bg").fadeIn();
				});
				//弹出：确认按钮
				$(".trueBtn").click(function() {
					alert("你点击了确认！"); //测试
					$(".pop_bg").fadeOut();
				});
				//弹出：取消或关闭按钮
				$(".falseBtn").click(function() {
					alert("你点击了取消/关闭！"); //测试
					$(".pop_bg").fadeOut();
				});
			});
		</script>
		<section class="pop_bg">
			<div class="pop_cont">
				<!--title-->
				<h3>弹出提示标题</h3>
				<!--content-->
				<div class="pop_cont_input">
					<ul>
						<li>
							<span>标题</span>
							<input type="text" placeholder="定义提示语..." class="textbox" />
						</li>
						<li>
							<span class="ttl">城市</span>
							<select class="select">
								<option>选择省份</option>
							</select>
							<select class="select">
								<option>选择城市</option>
							</select>
							<select class="select">
								<option>选择区/县</option>
							</select>
						</li>
						<li>
							<span class="ttl">地址</span>
							<input type="text" placeholder="定义提示语..." class="textbox" />
						</li>
						<li>
							<span class="ttl">地址</span>
							<textarea class="textarea" style="height:50px;width:80%;"></textarea>
						</li>
					</ul>
				</div>
				<!--以pop_cont_text分界-->
				<div class="pop_cont_text">
					这里是文字性提示信息！
				</div>
				<!--bottom:operate->button-->
				<div class="btm_btn">
					<input type="button" value="确认" class="input_btn trueBtn" />
					<input type="button" value="关闭" class="input_btn falseBtn" />
				</div>
			</div>
		</section>
		<!--结束：弹出框效果-->
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
	<div class="flexigrid">

		<div class="mDiv">
			<div class="ftitle">
				<h3>商户列表</h3>
				<h5>(共<?php echo $count; ?>条记录)</h5>
			</div>
			<div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
			<form class="navbar-form form-inline" action="" method="get">
				<div class="sDiv">
					<div class="sDiv2">

						<select name="status" class="select">
							<option value="">全部状态</option>
							<option value="0" <?php if($status == '0'): ?>selected <?php endif; ?>>待审核</option>
							<option value="1" <?php if($status == '1'): ?>selected <?php endif; ?>>已通过</option>
							<option value="2" <?php if($status == '2'): ?>selected <?php endif; ?>>修改店铺</option>
							<option value="3" <?php if($status == '3'): ?>selected <?php endif; ?>>修改店址</option>
							<option value="-1" <?php if($status == '-1'): ?>selected <?php endif; ?>>不通过</option>
						</select>
						<input type="text" class="qsbox" name="keyword" placeholder="可搜索昵称或手机号码" value="<?php echo $keyword; ?>">
						<input  class="btn"type="submit" value="搜索">
						<input   class="btn"type="submit" name="export" value="导出excel" />
					</div>
				</div>
			</form>
		</div>
		<div class="hDiv">
			<div class="hDivBox">
				<table cellspacing="0" cellpadding="0">
					<thead>
					<tr>

						<th class="sign" axis="col0">
							<div style="width: 24px;"><i class="ico-check"></i></div>
						</th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 100px;" class="">姓名</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 100px;" class="">自提点</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 100px;" class="">首页显示</div>
						</th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 100px;" class="">手机号码</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 150px;" class="">身份证号</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 150px;" class="">银行卡号</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 200px;" class="">店铺名称</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
						<div style="text-align: left; width: 250px;" class="">店铺地址</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
						<div style="text-align: left; width: 60px;" class="">佣金(%)</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
						<div style="text-align: left; width: 80px;" class="">自提返利(￥)</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 90px;" class="">排序(点击修改)</div></th>
						<th align="left" abbr="ac_id" axis="col4" class="">
							<div style="text-align: left; width: 90px;" class="">店铺状态</div></th>
						<th align="center" axis="col1" class="handle">
							<div style="text-align: center; width: 250px;">操作</div>
						</th>
						<!--<th style="width:100%" axis="col7">
							<div></div>
						</th>-->
					</tr>
					</thead>
				</table>
			</div>
		</div>
		<div class="tDiv">
			<div class="tDiv2">
				<div class="fbutton">
					<a href="<?php echo url('Merchant/add_merchant'); ?>" style="float: left">
						<div class="add">
							<span><i class="fa fa-plus"></i>添加商户</span>
						</div>
					</a>
					<a href="javascript:void(0)" onclick="set_translation(1)" style="float: left;margin-left: 15px">
						<div class="add">
							<span>设置自提点</span>
						</div>
					</a>
					<a href="javascript:void(0)" onclick="set_translation(0)" style="float: left;margin-left: 15px">
						<div class="add">
							<span>取消自提点</span>
						</div>
					</a>
				</div>
			</div>
			<div style="clear:both"></div>
		</div>
		<div class="bDiv" style="height: auto;">
			<div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
				<table>
					<tbody>
					<?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): if( count($list)==0 ) : echo "" ;else: foreach($list as $k=>$vo): ?>
						<tr id="<?php echo $vo['id']; ?>">
							<td class="sign">
								<div style="width: 24px;"><i class="ico-check"></i></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 100px;"><?php echo $vo['realname']; ?></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 100px;"><?php if($vo['is_mention'] == 1): ?>是<?php else: ?>否<?php endif; ?></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 100px;" ><?php if($vo['is_home'] == '1'): ?>显示<?php endif; if($vo['is_home'] == '-1'): ?>不显示<?php endif; ?></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 100px;"><?php echo $vo['mobile']; ?></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 150px;"><?php echo $vo['idcard']; ?></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 150px;"><?php echo $vo['bankcard']; ?></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 200px;"><?php echo $vo['shopname']; ?></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 250px;"><?php echo $vo['province']; ?><?php echo $vo['city']; ?><?php echo $vo['county']; ?><?php echo $vo['street']; ?><?php echo $vo['address']; ?></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 60px;"><?php if(!empty($vo['commission'])): ?><?php echo $vo['commission']; else: ?>0<?php endif; ?></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 80px;"><?php if(!empty($vo['cmomission_mention'])): ?><?php echo $vo['cmomission_mention']; else: ?>0<?php endif; ?></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 90px;"><span title="点击可编辑，enter键确认修改"  style="display:block;width: 80px;" class="sort"><?php echo $vo['sort']; ?></span><input class="sort_input"  style="width: 80px" type="hidden"  data-id="<?php echo $vo['id']; ?>" value="<?php echo $vo['sort']; ?>"></div>
							</td>
							<td align="left" class="">
								<div style="text-align: left; width: 90px;"><span t style="display:block;width: 80px;" ><?php switch($vo['status']): case "0": ?><span style="color:red">待审核</span><?php break; case "1": ?><span style="color:green">已通过</span><?php break; case "2": ?><span style="color:red">修改店铺</span><?php break; case "3": ?><span style="color:red">修改店址</span><?php break; case "-1": ?><span style="color:#ccc">不通过</span><?php break; endswitch; ?></span></div>
							</td>
							<td align="center" class="handle">
								<div style="text-align: center; width: 250px;">
									<a href="<?php echo url('merchant/detail',array('id'=>$vo['id'])); ?>" class="btn blue"><i class="fa fa-pencil-square-o"></i>详情</a>
									<?php echo $vo['status']; if($vo['status'] == '1'): ?>
										<a class="btn red"  href="javascript:void(0)" data-url="<?php echo url('merchant/check'); ?>" data-name="确定设置为待审核状态?" data-id="<?php echo $vo['id']; ?>" data-status="0" onclick="checkfun(this)"><i class="fa fa-clock-o"></i>禁止</a>
										<?php if($vo['ishome'] == '0'): ?>
										<a class="btn blue"  href="javascript:void(0)" data-url="<?php echo url('merchant/ishome'); ?>" data-name="确定设置为推荐状态?" data-id="<?php echo $vo['id']; ?>" data-status="0" onclick="recommend(this)"><i class="fa fa-clock-o"></i>推荐</a>
										<?php endif; if($vo['ishome'] == '1'): ?>
											<a class="btn blue"  href="javascript:void(0)" data-url="<?php echo url('merchant/ishome'); ?>" data-name="确定取消状态?" data-id="<?php echo $vo['id']; ?>" data-status="0" onclick="recommend(this)"><i class="fa fa-clock-o"></i>不推荐</a>
										<?php endif; endif; if($vo['status'] == '0'): ?>
										<a class="btn red"  href="javascript:void(0)" data-url="<?php echo url('merchant/check'); ?>" data-id="<?php echo $vo['id']; ?>" data-name="确定审核通过?"  data-status="1"  onclick="checkfun(this)"><i class="fa fa-clock-o"></i>通过</a>
										<a class="btn red"  href="javascript:void(0)" data-url="<?php echo url('merchant/check'); ?>" data-name="确定审核不通过?" data-id="<?php echo $vo['id']; ?>" data-status="-1" onclick="checkfun(this)"><i class="fa fa-clock-o"></i>禁止</a>
									<?php endif; if($vo['status'] == '-1'): ?>
										<a class="btn red"  href="javascript:void(0)" data-url="<?php echo url('merchant/check'); ?>" data-name="确定设置为待审核状态?" data-id="<?php echo $vo['id']; ?>" data-status="0" onclick="checkfun(this)"><i class="fa fa-clock-o"></i>重新审核</a>
									<?php endif; if($vo['status'] == '2'): ?>
										<a class="btn red"  href="javascript:void(0)" data-url="<?php echo url('merchant/check'); ?>" data-id="<?php echo $vo['id']; ?>" data-name="确定审核通过?"  data-status="1"  onclick="checkfun(this)"><i class="fa fa-clock-o"></i>通过</a>
										<a class="btn red"  href="javascript:void(0)" data-url="<?php echo url('merchant/check'); ?>" data-name="确定审核不通过?" data-id="<?php echo $vo['id']; ?>" data-status="2" onclick="checkfun(this)"><i class="fa fa-clock-o"></i>禁止</a>
									<?php endif; if($vo['status'] == '3'): ?>
										<a class="btn red"  href="javascript:void(0)" data-url="<?php echo url('merchant/check'); ?>" data-id="<?php echo $vo['id']; ?>" data-name="确定审核通过?"  data-status="1"  onclick="checkfun(this)"><i class="fa fa-clock-o"></i>通过</a>
										<a class="btn red"  href="javascript:void(0)" data-url="<?php echo url('merchant/check'); ?>" data-name="确定审核不通过?" data-id="<?php echo $vo['id']; ?>" data-status="2" onclick="checkfun(this)"><i class="fa fa-clock-o"></i>禁止</a>
									<?php endif; ?>
									<a class="btn red"  href="javascript:void(0)" data-url="<?php echo url('merchant/check'); ?>" data-id="<?php echo $vo['id']; ?>" data-status="-2" data-name="删除数据无法恢复，并且有可能影响用户体验，确定删除?" onclick="checkfun(this)"><i class="fa fa-trash-o"></i>删除</a>
									<a class="btn red"  href="<?php echo url('merchant/commission_set',array('id'=>$vo['id'])); ?>"><i class="fa fa-share-square-o"></i>推广佣金</a>
									<a class="btn red"  href="<?php echo url('merchant/commission_mention',array('id'=>$vo['id'])); ?>"><i class="fa fa-share-square-o"></i>自提返利</a>
									<a class="btn red"  href="<?php echo url('merchant/set_index',array('id'=>$vo['id'])); ?>"><i class="fa fa-share-square-o"></i>商户系统设置</a>

									<a class="btn red"  href="javascript:void(0)" data-url="<?php echo url('merchant/set_shop_home'); ?>" data-id="<?php echo $vo['id']; ?>" onclick="is_home(this)"><i class="fa fa-university"></i>默认首页</a>
								</div>
							</td>
							<td align="" class="" style="width: 100%;">
								<div>&nbsp;</div>
							</td>
						</tr>
					<?php endforeach; endif; else: echo "" ;endif; ?>
					</tbody>
				</table>
			</div>
			<div class="iDiv" style="display: none;"></div>
		</div>
		<?php echo $list->render(); ?>
		<!--分页位置-->
	</div>
</div>
<script>

	function set_translation(type){
		var ids = new Array();
		var url = "<?php echo url('Merchant/set_translation'); ?>";
		$(".trSelected").each(function () {
			ids.push($(this).attr('id'));
		})

		layer.confirm( "是否确认操作?", {
			btn: ['确定', '取消'] //按钮
		}, function () {
			$.ajax({
				type: 'post',
				url: url,
				data : {ids:ids,type:type},
				dataType: 'json',
				success: function (data) {
					if (data == 1) {
						window.location.reload();
					} else {
						layer.alert('操作失败', {icon: 2});
					}
				}
			})
		}, function () {
		});
	}

	$(document).ready(function(){
		// 表格行点击选中切换
		$('#flexigrid > table>tbody >tr').click(function(){
			$(this).toggleClass('trSelected');
		});
		// 点击刷新数据
		$('.pReload').click(function(){
			location.href = location.href;
		});
		$(".sort").click(function(){
			$(this).hide();
			$(this).siblings("input").prop("type","number");
		});
		$(".sort_input").keydown(function(e){
			var ev = document.all ? window.event : e;
			if (ev.keyCode == 13) {
				var str = $(this);
				var id = $(this).data("id");
				var num = new Number($(this).val());
				//var num = a.toFixed(2);
				$.post("<?php echo url('merchant/sort'); ?>", {id: id, num: num}, function (result) {
					if (result == 1) {
						str.prop("type", "hidden");
						str.val(num);
						str.siblings("span").show();
						str.siblings("span").html(num);
					} else {
						alert('系统繁忙，稍后再试');
					}
				});

			}
		})
	});
	function checkfun(obj) {
		// 删除按钮
		var confirm=$(obj).attr('data-name');
		layer.confirm(confirm, {
			btn: ['确定', '取消'] //按钮
		}, function () {
			$.ajax({
				type: 'post',
				url: $(obj).attr('data-url'),
				data : {id:$(obj).attr('data-id'),status:$(obj).attr('data-status')},
				dataType: 'json',
				success: function (data) {
					if (data == 1) {
						window.location.reload();
					} else {
						layer.alert(data, {icon: 2});  //alert('删除失败');
					}
				}
			})
		}, function () {
		});
	}
	function recommend(obj) {
		// 删除按钮
		var confirm=$(obj).attr('data-name');
		layer.confirm(confirm, {
			btn: ['确定', '取消'] //按钮
		}, function () {
			$.ajax({
				type: 'post',
				url: $(obj).attr('data-url'),
				data : {id:$(obj).attr('data-id')},
				dataType: 'json',
				success: function (data) {
					if (data == 1) {
						window.location.reload();
					} else {
						layer.alert('操作失败', {icon: 2});  //alert('删除失败');
					}
				}
			})
		}, function () {
		});
	}
	function is_home(obj){
		$.ajax({
			type: 'post',
			url: $(obj).attr('data-url'),
			data : {id:$(obj).attr('data-id')},
			dataType: 'json',
			success: function(data){
				 window.location.href = data.url;
			}
		})

		return false;
	}
</script>
</body>
</html>
</html>